#ifndef QPADWIDGET_H
#define QPADWIDGET_H

#include <QWidget>
#include "ui_qpadwidget.h"

class QPadWidget : public QWidget
{
	Q_OBJECT

public:
	QPadWidget(QWidget *parent = 0);
	~QPadWidget();

	bool Smooth();

	const QList<QPoint>& getSmoothPoints() { return mSmoothPoints; }

	void clearPad()
	{
		mPoints.clear();
		mSmoothPoints.clear();
		update();
	}
protected:
	void paintEvent(QPaintEvent *event);
	void mousePressEvent(QMouseEvent *event);
	void mouseMoveEvent(QMouseEvent *event);
	void mouseReleaseEvent(QMouseEvent *event);

signals:
	void mouseReleaseEmit();
private:
	Ui::QPadWidget ui;

	bool			mIsDrawing;
	QList<QPoint>	mPoints;
	QList<QPoint>	mSmoothPoints;
};

#endif // QPADWIDGET_H
